Reference: Variables
Move Up Move to Top Move to Top
Contents: General Variable Info Variable Naming & Lookup
Variables Errors Variables Lookup Recursion
Variables Naming Recursion Global Variables
Article Variables Group Variables
Project Variables Multimedia Variables
Filter Specific Variables
General Variable Info Variables may be used in most text strings. For example, the default article viewer title (settable in the configuration area) is:
  \33bFrom:\33n ${ArtUserName}  \33bSubj\33n: ${ArtSubj}

This prints the word From: in bold, followed by the user name found in the viewed article, followed by the word Subj: again in bold, followed by the article subject header field.

A variable is used in a text value. Any text of the form ${varname} is replaced by the contents of the named variable. There are several ways a variable can find its value. There is a global list of variables that applies everywhere. These variables can be seen by any object. This global list can be edited from the main editor window and may include user defined values.

Also, each group, article, or filter can potentially export a set of variables. In the previous example the variables ${ArtUserName} and ${ArtSubj} are referenced. These variables are exported by the article being viewed. When a new article is selected for reading, the article viewer title will automatically change as well.

Back to Top

Variable Naming & Lookup Variable references have the form ${Varname}. Variable names are case sensitive and may contain any valid character except a closing curly brace '}'.

Article and group variables are searched first. If no definition is found, then the global variable list is searched in order. If more than one variable is defined with the same name, the results are undefined.

Back to Top

Variable Errors The following conditions will trigger an error, and the variable reference will return the string ERROR.

  • Unterminated variable name. Opening '${' not matched by closing '}'.

  • Maximum variable name length (31 characters) exceeded.

  • Too many variable replacements - typically when a variable recursion loop exists - i.e, the definition of variable A is ${B}, and the definition of variable B is ${A}. The limit is 32.

  • No expansion found for variable name.

Back to Top
Variable Lookup Recursion Two types of variable recursion are permitted; this is one.

If a variable expansion results in a string that contains another variable reference, variable expansion happens again on the new string until either no variable references are left, or a maximum replacement count is exceeded.

For example, consider a user defined variable MyArtInfo who's definition is: ${ArtUserAbbrev} (${ArtUserName}). When the variable ${MyArtInfo} is referenced, it first yields the definition above. But the definition contains two additional variable references, one to ${ArtUserAbbrev} and another to ${ArtUserName}. These variables are in turned looked up to find their definition, and the end result might be that referencing ${MyArtInfo} yields the string: JBS (John B. Smith).

Back to Top

Variable Naming Recursion Two types of variable recursion are permitted; this is another.

Recursion is permitted on variable names. Consider three variables, var1=Foo, var2=Bar, and variable FooBarXYZ=test.

The reference ${${var1}${var2}XYZ} will yield the string test. Inner variables are expanded before outer.

Back to Top

Read-Only Global Variables Some global variables are read-only. In many cases their value will change between expansions; for example, the amount of free memory.

Date & Time Variables (uses Locale settings)

Variable Explanation Example
AmPm AM/PM string AM
DayNum Day number (leading zeros) 03
DayNumSp Day number (leading spaces) 3
Hour12 Hour in 12 hour format (leading zeros) 04
Hour12Sp Hour in 12 hour format (leading spaces) 4
Hour24 Hour in 24 hour format (leading zeros) 04
Hour24Sp Hour in 24 hour format (leading spaces) 4
Min Minute value 59
Month Month name April
MonthNum Month number 05
MonthShort Month name (short) Apr
Sec Seconds 33
Weekday Day of week Tuesday
WeekdayShort Day of week (short) Tue
Year2 2 digit year 98
Year4 4 digit year 1998

Memory & Resource Variables

Variable Explanation Example
ChipKb Chip memory in Kb 1910
FastKb Fast memory in Kb 31022
AllKb All memory in Kb 32932
LargestKb Largest block in Kb 28107
ChipMb Chip memory in Mb 1
FastMb Fast memory in Mb 31
AllMb All memory in Mb 32
LargestMb Largest block in Mb 28

Back to Top
Article Variables The following variables refer to information about news articles:

Variable NameDescription
ArtDate The contents of the Date: header field.
ArtDistrib The contents of the Distribution: header field.
ArtFollowup The contents of the Followup-To: header field.
ArtFrom The contents of the From: header field.
ArtGroups The contents of the Newsgroups: header field.
ArtKeywords The contents of the Keywords: header field.
ArtLines The contents of the Lines: header field.
ArtMimeType The contents of the Content-Type: header field.
ArtMimeVer The contents of the Mime-Verseion: header field.
ArtMsgID The contents of the Message-ID: header field.
ArtNewsRd The contents of the X-Newsreader: header field.
ArtOrganiz The contents of the Organization: header field.
ArtArtPath The contents of the Path: header field.
ArtRef The contents of the Followup-To: header field.
ArtSender The contents of the Sender: header field.
ArtSubj The contents of the Subject: header field.
ArtUserAbbrev A short abbreviation for the user name. For example, if the posting user is John S. Smith, this variable would be JSS.
ArtUserEmail The email address portion of the From: header.
ArtUserName The user name portion of the From: header.

Back to Top

Group Variables The following variables refer to information about news groups:

Variable NameDescription
GroupAbbrev The abbreviated group name. For example, comp.sys.amiga.misc would be c.s.a.misc.
GroupMaxArticles The maximum number of articles to be fetched at one time.
GroupName The full group name.
GroupReadArticles The number of read articles in this group.
GroupTotArticles The total number of articles in the group.
GroupUnreadArticles The number of unread articles in the group.

Back to Top

Project Variables The following variables refer to information about the NewsRog project:

Variable NameDescription
CacheDir The cache directory for this project.
UserName The user name that has been set in the configuration settings for this project.
UserEmail The user email address that has been set in the configuration settings for this project.
UserOrg The organization field that has been set in the configuration settings for this project.
SigFile The signature filename that has been set in the configuration settings for this project.
Editor The editor that has been set in the configuration settings for this project.

Back to Top

Multimedia Variables The following variables refer to decoded multimedia data:
Variable NameDescription
File (Used in the context of a multimedia action upon, for example, uuencoded or base64 data in an article body) - A filename which contains the decoded multimedia data. This used in various multimedia actions: see Multimedia Actions in the tutorial section.

Back to Top

Filter Variables The following variables can be used in the context of the indicated filters (any applicable group or article variables may also be used):

Filter TypeVariable NameDescription
URL
(Display Filter)
File When used in a multimedia action for a clickable URL, this variable will be set to a filename which contains the article text. By default this is the full header and body of the article, but the following suffixies can be used:

  • :Head - The file will contain only the header information.
  • :Body - The file will contain only the body, but no headers.
  • :HdBd - The file will contain both the header and the body of the article. This is the default.
  • :Q - The body of the article will be quoted.

For example, referencing the variable ${File:Body:Q} would specify a file containing the quoted body of the article, with no header. This is useful for passing the indicated text to an external program of some sort.

EMail
(Display Filter)
File The File variable in the Email display filter operates in the same manner as in the URL filter described above.
URL
(Display Filter)
URL The URL variable contains the URL that was clicked on.
EMail
(Display Filter)
email The email variable in the Email display filter contains the email address that was clicked on.
SaveTxt
(Action Filter)
File The File references a file containing the raw, unprocessed article text. This can be passed to, for example, an external decoder program.
SaveTxt
(Action Filter)
Num If more than one article has been queued to be sent to an action filter, this variable will be set to the ordinal position of the article in the queue. For example, if the filter is set to save articles to the filename RAM:Article_${Num}.Txt, then the saved files will be named RAM:Article_0001.Txt, RAM:Article_0002.Txt, and so on.

Back to Top